using System;
using System.Collections.Generic;
using System.Text;
using TTXNA.src.Util;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Input;

namespace TTXNA.src.Engine.Input
{
    public enum MouseButtons : int { Left = 0, Right = 1, Middle = 2 }

    public class TTMouse : TTUpdateable
    {
        MouseState oldState;
        MouseState newState;

        public TTMouse()
        {
            oldState = Mouse.GetState();
        }

        public void Update(GameTime gameTime)
        {
            oldState = newState;
            newState = Mouse.GetState();
        }

        public MouseState NewState
        {
            get { return newState; }
        }

        public MouseState OldState
        {
            get { return oldState; }
        }
    }

    public struct MouseData
    {
        private Point cursorLocation;
        private bool lmbDown;
        private bool rmbDown;
        private bool mmbDown;
        private int scrollDelta;

        

        public Point CursorLocation
        {
            get { return cursorLocation; }
            set { cursorLocation = value; }
        }

        public bool LeftMouseButtonDown
        {
            get { return lmbDown; }
            set { lmbDown = value; }
        }

        public bool RightMouseButtonDown
        {
            get { return rmbDown; }
            set { rmbDown = value; }
        }

        public bool MiddleMouseButtonDown
        {
            get { return mmbDown; }
            set { mmbDown = value; }
        }

        public int ScrollWheelDelta
        {
            get { return scrollDelta; }
            set { scrollDelta = value; }
        }

    }
}
